import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { SDramaLotteryItemInfo } from "../../../../Message/Game/SDramaLotteryItemInfo";
import { ItemData } from "../../resource/info/ItemData";
import { Language } from "../../../../extend/language/Language";
import { ColorConfig } from "../../resource/ColorConfig";
//class DramaLotteryHistoryRender
    
    export  class DramaLotteryHistoryRender extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ configUI(): void
        {
            super.configUI();
            if (this._txt != null) 
            {
                if (this._txt.parent) 
                {
                    removeChild(this._txt);
                }
            }
            this._txt = new Object /* flash.text.TextField */();
            this._txt.width = 180;
            this._txt.height = 20;
            this._txt.x = 5;
            this._txt.y = 0;
            this._txt.text = "000";
            this._txt.selectable = false;
            addChild(this._txt);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1 as SDramaLotteryItemInfo;
            var loc1=new ItemData(arg1.itemCode);
            var loc2=1;
            if (loc1.iteminfo !== null) 
            {
                this._txt.text = "【" + loc1.itemInfo.item.name + "】" + "  " + arg1.newPrice + Language.getString(70681);
                this._txt.textColor = ColorConfig.instance.getItemColor(loc1.itemInfo.item.color).intColor;
            }
            return;
        }

        /* internal */ /* var */_txt: Object /* flash.text.TextField */;
    }
